package cn.etynit.mms.feign;

import cn.etynit.dto.AccountLoginDto;
import cn.etynit.mms.fallback.UserServiceFallbackFactory;
import cn.etynit.result.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@FeignClient(contextId = "userService",value = "service-user",path = "/user",fallbackFactory = UserServiceFallbackFactory.class)
public interface UserService {
    @RequestMapping(value = "/{id}",method = RequestMethod.GET)
    JsonResult get(@PathVariable("id")Long id);
    @RequestMapping(value="/accountLogin",method= RequestMethod.POST)
    JsonResult accountLogin(@RequestBody AccountLoginDto accountLoginDto);
}
